﻿
using System.Windows;
using System.Windows.Data;

namespace DBFM7
{
    public class VisibilityConverter : IValueConverter
    {

        public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
           if((bool)value)
           {
               return Visibility.Visible;
           }
           else
           {

               return Visibility.Collapsed;
           }
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if((Visibility)value == Visibility.Visible)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
